<script setup lang="ts">
  import { SIconIconify } from '../SIconIconify'
  import { SIconIconifyOffline } from '../SIconIconifyOffline'
  import { SIconText } from '../SIconText'
  import { SIconLink } from '../SIconLink'
  import { SIconUnicode } from '../SIconUnicode'
  import { SIconFontClass } from '../SIconFontClass'
  import { SIconSymbol } from '../SIconSymbol'
  import { IconPropsType } from './types'
  import { IconTypeConst } from './consts'

  defineOptions({
    name: 'SIcon',
    components: {
      SIconIconify,
      SIconIconifyOffline,
      SIconText,
      SIconLink,
      SIconUnicode,
      SIconFontClass,
      SIconSymbol
    }
  })

  withDefaults(defineProps<IconPropsType>(), {
    iconType: IconTypeConst.ICONIFY
  })
</script>

<template>
  <component :is="iconType" class="s-icon" v-bind="iconProps" />
</template>

<style lang="scss">
  @use './style' as *;
</style>
